<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    div{
        margin-left: 40%;
        
    }
</style>
<body>
    <div>
        <form action="baidu" style="align-items: center;">
            <p>用户:<input type="text" id="userName"/></p>
            <p>密码:<input type="password" id="pass"/></p>
            <p>性别:
                <input type="radio"/>男
                <input type="radio"/>女
            </p>
            <p>学历:
                <input type="radio"/>本科
                <input type="radio"/>专科
            </p>
            <p>自我介绍：
                <textarea id="jie" cols="10" rows="5"></textarea>
            </p>
            <p>
                <input type="button" value="登录" " onclick="login()">
            </p>
        </form>
    </div>
</body>
<script>
    function login(){
        var userName = document.getElementById("userName").value;//获取登录的用户名
        var pass = document.getElementById("pass").value;
        var str = document.getElementById("jie");//获取自我介绍节点的对象
        if (userName== "admin" && pass == "123456"){
            alert(str.value);
        }else{
            alert("错误");
        }
    }

</script>
</html>